package com.acme.bankapp.service.bank;

import com.acme.bankapp.domine.bank.*;

public class BankApplication {

    public static void main(String[] args) {
        Bank bank = BankService.createNewBank();
        Client client1 = BankService.addClient(bank, "John", Gender.MALE);

        Account account1 = new SavingAccount(1, 50);
        client1.addAccount(account1);
        Account account2 = new CheckingAccount(2, 100, 0);
        client1.addAccount(account2);

        bank.addListeners(new Bank.PrintClientListener());
        bank.addListeners(new Bank.EmailNotificationListener());

        Client client2 = BankService.addClient(bank, "Jude", Gender.FEMALE);

        Account account3 = new SavingAccount(3, 500);
        client2.addAccount(account3);
        Account account4 = new CheckingAccount(4, 150, 20);
        client2.addAccount(account4);

        BankService.printBalance(bank);
        BankService.printMaximumAmountToWithdraw(bank);
    }
}
